/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Patrick;

/**
 *
 * @author Wallyson
 */
import java.util.Scanner;
public class Exercicio43 {
    public static void main(String [] args){
        
        Scanner s = new Scanner(System.in);
        
        double mediaValor = 0;        
        double [] media = new  double[500];
        
        for(int i = 0;i<=499;i++){
            System.out.println("Digite um valor");
            double valor = s.nextDouble();
            media[i] = valor;
        
        }
        for(double mediaTotal:media){
            
            mediaValor = (mediaValor+ mediaTotal/500);
                      
        }
    
    System.out.println("A media foi "+mediaValor);
    
    }
    
}
